package trlygjj.tanruiliyigenjinjin.query;

import lombok.Getter;
import lombok.Setter;

/**
 * Created by user on 2018/7/7.
 */

/**
 * 查询条件的父类
 */
@Setter
@Getter
public class QueryObject {
    /**
     * page默认的当前页
     */
    private int page = 1;
    /**
     * rows默认的每页显示条数
     */
    private int rows = 50;

    /**
     * 分页的索引起始位置
     * @return
     */
    public int getStartIndex(){
        return (page - 1) * rows;
    }
}
